<template>
  <el-table :data="tableData" class="el_table" align="center">
    <el-table-column type="index" label="今日场次" width="180" align="center"></el-table-column>
    <el-table-column prop="date"      label="放映时间"  width="180" align="center" >
      <template slot-scope="scope">
        <i class="el-icon-time"></i>
        {{scope.row.date}}
      </template>
    </el-table-column>
    <el-table-column prop="language"  label="语言版本"  width="180" align="center"></el-table-column>
    <el-table-column prop="showRoom"  label="放映厅" align="center">              </el-table-column>
    <el-table-column propa="money"     label="售价(元)" width="180" align="center"></el-table-column>

    <el-table-column label="选座购票"width="180" align="center">
      <template slot-scope="scope">
        <el-button @click="toSeat(scope.row)" type="text" size="small" style="font-size:16px">选座购票</el-button>
      </template>
    </el-table-column>
<!--    <el-table-column-->
<!--      label="加入购物车">-->
<!--      <template slot-scope="scope">-->
<!--        <el-button @click="toCart(scope.row)" type="text" size="small" style="font-size:16px">加入购物车</el-button>-->
<!--      </template>-->
<!--    </el-table-column>-->
  </el-table>
</template>

<script>
    export default {
        name: "MovieInfor",
        data(){
            return{
                code:'3',
                tableData:[{
                    date:'12:30',
                    language:'中文',
                    showRoom:'3号激光厅',
                    money:'45',

                },
                    {
                        date:'11:00',
                        language:'中文',
                        showRoom:'4号激光厅',
                        money:'40',

                    },
                    {
                        date:'13:00',
                        language:'中文',
                        showRoom:'7号激光厅',
                        money:'30',

                    }
                ]
            }
        },
        methods:{

            // toCart(row){
            //     console.log(row);
            // },
            toSeat(row){
                console.log(row);
                // this.$router.push();
              },
            selectMovies(mid){
                var vm = this;
                this.axios({
                    url:'',
                }).then(function (res) {
                    if (res.data.success){
                     vm.tableData = res.data.data;
                    }
                })
            }
        },
        created() {
            var mid = this.$route.params.id;
            this.selectMovies(mid);
        }
    }
</script>

<style scoped>
  .el_table{
    width:800px;
    margin-left: 100px;
    margin-top: 30px;
    font-size: 16px;
    text-align: center;
  }
</style>
